<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>汽车圈 - 发现页面预览</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: #f8f9fa;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* 顶部导航 */
        .top-nav {
            background-color: #ffffff;
            border-bottom: 1px solid #e9ecef;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .nav-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
        }

        .nav-title {
            font-size: 20px;
            font-weight: 600;
            color: #333333;
        }

        .nav-actions {
            display: flex;
            gap: 16px;
        }

        .search-btn, .publish-btn {
            font-size: 18px;
            padding: 8px;
            border-radius: 50%;
            background-color: #f8f9fa;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
        }

        .search-btn:hover, .publish-btn:hover {
            background-color: #e9ecef;
        }

        /* 分类标签 */
        .category-tabs {
            overflow-x: auto;
            white-space: nowrap;
            padding: 0 16px 12px;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .category-tabs::-webkit-scrollbar {
            display: none;
        }

        .tabs-container {
            display: flex;
            gap: 8px;
        }

        .tab-item {
            padding: 6px 16px;
            border-radius: 20px;
            background-color: #f8f9fa;
            color: #666666;
            font-size: 14px;
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
        }

        .tab-item.active {
            background-color: #007bff;
            color: #ffffff;
        }

        /* 内容滚动区域 */
        .content-scroll {
            flex: 1;
            padding: 0 16px;
            overflow-y: auto;
        }

        /* 帖子列表 */
        .posts-list {
            padding-top: 16px;
        }

        .post-item {
            background-color: #ffffff;
            border-radius: 12px;
            margin-bottom: 12px;
            padding: 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .post-item:hover {
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        }

        /* 用户信息 */
        .post-header {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 12px;
            background-color: #e9ecef;
        }

        .user-info {
            flex: 1;
        }

        .user-name-row {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 2px;
        }

        .user-name {
            font-size: 15px;
            font-weight: 600;
            color: #333333;
        }

        .user-badge {
            color: #007bff;
            font-size: 12px;
        }

        .post-category {
            background-color: #e3f2fd;
            color: #1976d2;
            font-size: 12px;
            padding: 2px 8px;
            border-radius: 10px;
        }

        .post-time {
            font-size: 13px;
            color: #999999;
        }

        .follow-btn {
            background-color: #007bff;
            color: #ffffff;
            font-size: 14px;
            padding: 6px 16px;
            border-radius: 16px;
            cursor: pointer;
            border: none;
        }

        /* 帖子内容 */
        .post-content {
            margin-bottom: 12px;
        }

        .post-text {
            font-size: 15px;
            line-height: 1.5;
            color: #333333;
            margin-bottom: 12px;
            white-space: pre-line;
        }

        /* 图片网格 */
        .post-images {
            display: grid;
            gap: 4px;
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 12px;
        }

        .post-image {
            width: 100%;
            cursor: pointer;
            transition: all 0.2s ease;
            background-color: #e9ecef;
            height: 120px;
            border-radius: 4px;
        }

        .post-image:hover {
            opacity: 0.9;
        }

        .images-grid-2 {
            grid-template-columns: 1fr 1fr;
        }

        .images-grid-3 {
            grid-template-columns: 1fr 1fr 1fr;
        }

        /* 互动区域 */
        .post-actions {
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 12px 0;
            border-top: 1px solid #f0f0f0;
            margin-top: 12px;
        }

        .action-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 8px 16px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            background: transparent;
            min-width: 60px;
        }

        .action-item:hover {
            background-color: #f8f9fa;
            transform: translateY(-1px);
        }

        .action-icon {
            font-size: 20px;
            transition: all 0.2s ease;
            margin-bottom: 2px;
        }

        .action-icon.liked {
            color: #ff4757;
        }

        .action-icon.collected {
            color: #ffa502;
        }

        .action-text {
            font-size: 12px;
            color: #666666;
            font-weight: 500;
        }

        /* 链接卡片 */
        .link-card {
            display: flex;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .link-card:hover {
            background-color: #f8f9fa;
        }

        .link-image {
            width: 80px;
            height: 60px;
            flex-shrink: 0;
            background-color: #e9ecef;
        }

        .link-info {
            padding: 8px 12px;
            flex: 1;
        }

        .link-title {
            font-size: 14px;
            font-weight: 600;
            color: #333333;
            margin-bottom: 4px;
            display: block;
        }

        .link-desc {
            font-size: 12px;
            color: #666666;
            line-height: 1.3;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 顶部导航栏 -->
        <div class="top-nav">
            <div class="nav-header">
                <div class="nav-title">汽车圈</div>
                <div class="nav-actions">
                    <button class="search-btn" onclick="showSearch()">🔍</button>
                    <button class="publish-btn" onclick="publishPost()">✏️</button>
                </div>
            </div>
            
            <!-- 分类标签 -->
            <div class="category-tabs">
                <div class="tabs-container">
                    <button class="tab-item active" onclick="switchCategory('all')">推荐</button>
                    <button class="tab-item" onclick="switchCategory('new-car')">新车</button>
                    <button class="tab-item" onclick="switchCategory('used-car')">二手车</button>
                    <button class="tab-item" onclick="switchCategory('knowledge')">汽车知识</button>
                    <button class="tab-item" onclick="switchCategory('maintenance')">保养维修</button>
                    <button class="tab-item" onclick="switchCategory('policy')">政策法规</button>
                    <button class="tab-item" onclick="switchCategory('experience')">用车体验</button>
                </div>
            </div>
        </div>

        <!-- 内容区域 -->
        <div class="content-scroll">
            <!-- 微博式动态列表 -->
            <div class="posts-list">
                <!-- 新车帖子 -->
                <div class="post-item" onclick="openPost(1)">
                    <div class="post-header">
                        <div class="user-avatar"></div>
                        <div class="user-info">
                            <div class="user-name-row">
                                <div class="user-name">汽车之家官方</div>
                                <div class="user-badge">✓</div>
                                <div class="post-category">新车</div>
                            </div>
                            <div class="post-time">2小时前</div>
                        </div>
                        <button class="follow-btn" onclick="followUser(event)">关注</button>
                    </div>

                    <div class="post-content">
                        <div class="post-text">🚗【新车速递】2025款奔驰E级正式上市！全新设计语言，科技感爆棚，起售价42.98万元。内饰采用11.9英寸中控屏+12.3英寸仪表盘，支持MBUX智能人机交互系统。你们觉得这个价格如何？</div>
                        
                        <div class="post-images images-grid-3">
                            <div class="post-image"></div>
                            <div class="post-image"></div>
                            <div class="post-image"></div>
                        </div>

                        <div class="link-card" onclick="openLink(event)">
                            <div class="link-image"></div>
                            <div class="link-info">
                                <div class="link-title">2025款奔驰E级详细配置</div>
                                <div class="link-desc">查看完整参数配置和试驾体验</div>
                            </div>
                        </div>
                    </div>

                    <div class="post-actions">
                        <button class="action-item" onclick="likePost(event)">
                            <span class="action-icon">❤️</span>
                            <span class="action-text">1205</span>
                        </button>
                        <button class="action-item" onclick="commentPost(event)">
                            <span class="action-icon">💬</span>
                            <span class="action-text">89</span>
                        </button>
                        <button class="action-item" onclick="sharePost(event)">
                            <span class="action-icon">🔄</span>
                            <span class="action-text">156</span>
                        </button>
                        <button class="action-item" onclick="collectPost(event)">
                            <span class="action-icon">⭐</span>
                            <span class="action-text">收藏</span>
                        </button>
                    </div>
                </div>

                <!-- 二手车帖子 -->
                <div class="post-item" onclick="openPost(2)">
                    <div class="post-header">
                        <div class="user-avatar"></div>
                        <div class="user-info">
                            <div class="user-name-row">
                                <div class="user-name">老司机张师傅</div>
                                <div class="post-category">二手车</div>
                            </div>
                            <div class="post-time">4小时前</div>
                        </div>
                        <button class="follow-btn" onclick="followUser(event)">关注</button>
                    </div>

                    <div class="post-content">
                        <div class="post-text">💡【二手车避坑指南】刚帮朋友看了一台15年的宝马3系，表面看起来很新，但是发现了这些问题：

1️⃣ 发动机舱有明显清洗痕迹
2️⃣ 车门密封条有更换痕迹
3️⃣ 漆面厚度不均匀

最终砍价5万成交！大家买二手车一定要仔细检查 🔍</div>

                        <div class="post-images images-grid-2">
                            <div class="post-image"></div>
                            <div class="post-image"></div>
                        </div>
                    </div>

                    <div class="post-actions">
                        <button class="action-item" onclick="likePost(event)">
                            <span class="action-icon liked">❤️</span>
                            <span class="action-text">892</span>
                        </button>
                        <button class="action-item" onclick="commentPost(event)">
                            <span class="action-icon">💬</span>
                            <span class="action-text">156</span>
                        </button>
                        <button class="action-item" onclick="sharePost(event)">
                            <span class="action-icon">🔄</span>
                            <span class="action-text">78</span>
                        </button>
                        <button class="action-item" onclick="collectPost(event)">
                            <span class="action-icon">⭐</span>
                            <span class="action-text">收藏</span>
                        </button>
                    </div>
                </div>

                <!-- 汽车知识帖子 -->
                <div class="post-item" onclick="openPost(3)">
                    <div class="post-header">
                        <div class="user-avatar"></div>
                        <div class="user-info">
                            <div class="user-name-row">
                                <div class="user-name">电车小白</div>
                                <div class="post-category">汽车知识</div>
                            </div>
                            <div class="post-time">6小时前</div>
                        </div>
                        <button class="follow-btn" onclick="followUser(event)">关注</button>
                    </div>

                    <div class="post-content">
                        <div class="post-text">🔋【新手必看】电动车充电小知识分享：

✅ 正确做法：
• 电量剩余20-30%时充电
• 避免完全放电
• 使用原装充电器
• 充电时保持通风

❌ 错误做法：
• 经常快充
• 充电过夜
• 高温环境充电

我的Model Y用了2年，电池健康度还有96%！</div>

                        <div class="post-images">
                            <div class="post-image" style="height: 200px;"></div>
                        </div>
                    </div>

                    <div class="post-actions">
                        <button class="action-item" onclick="likePost(event)">
                            <span class="action-icon">❤️</span>
                            <span class="action-text">567</span>
                        </button>
                        <button class="action-item" onclick="commentPost(event)">
                            <span class="action-icon">💬</span>
                            <span class="action-text">89</span>
                        </button>
                        <button class="action-item" onclick="sharePost(event)">
                            <span class="action-icon">🔄</span>
                            <span class="action-text">45</span>
                        </button>
                        <button class="action-item" onclick="collectPost(event)">
                            <span class="action-icon collected">⭐</span>
                            <span class="action-text">收藏</span>
                        </button>
                    </div>
                </div>

                <!-- 政策法规帖子 -->
                <div class="post-item" onclick="openPost(4)">
                    <div class="post-header">
                        <div class="user-avatar"></div>
                        <div class="user-info">
                            <div class="user-name-row">
                                <div class="user-name">交警蜀黍</div>
                                <div class="user-badge">✓</div>
                                <div class="post-category">政策法规</div>
                            </div>
                            <div class="post-time">12小时前</div>
                        </div>
                    </div>

                    <div class="post-content">
                        <div class="post-text">📢【重要通知】2025年车检新政策要点：

🆕 主要变化：
• 6年内新车免检延长至8年
• 增加OBD检测项目
• 检测费用统一标准
• 可网上预约检测时间

📅 实施时间：2025年3月1日起

请各位车主提前了解，合理安排检车时间！</div>

                        <div class="post-images images-grid-2">
                            <div class="post-image"></div>
                            <div class="post-image"></div>
                        </div>
                    </div>

                    <div class="post-actions">
                        <button class="action-item" onclick="likePost(event)">
                            <span class="action-icon">❤️</span>
                            <span class="action-text">2156</span>
                        </button>
                        <button class="action-item" onclick="commentPost(event)">
                            <span class="action-icon">💬</span>
                            <span class="action-text">234</span>
                        </button>
                        <button class="action-item" onclick="sharePost(event)">
                            <span class="action-icon">🔄</span>
                            <span class="action-text">567</span>
                        </button>
                        <button class="action-item" onclick="collectPost(event)">
                            <span class="action-icon">⭐</span>
                            <span class="action-text">收藏</span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        function showSearch() {
            alert('搜索功能');
        }

        function publishPost() {
            alert('发布帖子功能开发中');
        }

        function switchCategory(category) {
            // 移除所有active类
            document.querySelectorAll('.tab-item').forEach(tab => {
                tab.classList.remove('active');
            });
            // 添加active类到当前点击的标签
            event.target.classList.add('active');
            console.log('切换到分类:', category);
        }

        function followUser(event) {
            event.stopPropagation();
            event.target.textContent = '已关注';
            event.target.style.backgroundColor = '#6c757d';
        }

        function likePost(event) {
            event.stopPropagation();
            const icon = event.currentTarget.querySelector('.action-icon');
            const text = event.currentTarget.querySelector('.action-text');

            if (icon.classList.contains('liked')) {
                icon.classList.remove('liked');
                text.textContent = parseInt(text.textContent) - 1;
            } else {
                icon.classList.add('liked');
                text.textContent = parseInt(text.textContent) + 1;
            }
        }

        function commentPost(event) {
            event.stopPropagation();
            alert('评论功能开发中');
        }

        function sharePost(event) {
            event.stopPropagation();
            alert('分享功能');
        }

        function collectPost(event) {
            event.stopPropagation();
            const icon = event.currentTarget.querySelector('.action-icon');

            if (icon.classList.contains('collected')) {
                icon.classList.remove('collected');
                alert('已取消收藏');
            } else {
                icon.classList.add('collected');
                alert('已收藏');
            }
        }

        function openPost(id) {
            console.log('打开帖子:', id);
            alert('帖子详情页开发中');
        }

        function openLink(event) {
            event.stopPropagation();
            alert('打开链接');
        }
    </script>
</body>
</html>
